var a = require("../../res/www.a9a.cn.js"),
  i = getApp();
Page({
  data: { ifwin: !0 },
  onLoad: function (t) {
    var n = t.tguid,
      e = t.admid;
    (n = i.empty(n) ? 0 : n), (e = i.empty(e) ? 0 : e);
    var o = this;
    o.setData({ tguid: n, admid: e }),
      console.log("u-login->  tguid=" + n),
      console.log("u-login->  admid=" + e),
      i.ajax({
        url: "loading.php",
        data: { submitok: "getvar" },
        success: function (i) {
          1 == i.flag
            ? o.setData({
                loading: i.loading,
                path_s: i.loading.path_s,
                path_s_url: i.loading.path_s_url,
                color: i.color,
                rgbcolor: a.c16_rgb(i.color),
                h1: i.h1,
                h5: i.h5,
                MB: i.MB,
              })
            : wx.showToast({ title: i.msg, icon: "none", mask: !0 });
        },
      }),
      i.get_navigationBarTopHeight(this);
  },
  ifagreeFn: function (a) {
    1 == a.detail.value
      ? this.setData({ ifwin: !1 })
      : this.setData({ ifwin: !0 });
  },
  btnFn: function () {
    a.empty(this.data.MB) || i.openSetting(this.data.MB),
      this.setData({ div_login: !0 });
  },
  onShow: function () {
    i.chklogin().then(function (a) {
      a && wx.switchTab({ url: "../my/my" });
    });
  },
  getPhoneNumber: function (a) {
    var t = this.data.tguid,
      n = this.data.admid;
    i.getPhoneNumber({
      e: a,
      tguid: t,
      admid: n,
      url: "../reg/reg?tguid=" + t + "&admid=" + n,
      urlkind: "navigateTo",
    });
  },
  back: function () {
    this.setData({ div_login: !1 });
  },
  onShareAppMessage: function () {
    return {
      imageUrl: this.data.loading.share.imgurl,
      title: this.data.loading.share.title,
      path: "/pages/login/login",
    };
  },
  onShareTimeline: function () {
    return {
      imageUrl: this.data.loading.share.imgurl,
      title: this.data.loading.share.title,
      query: "",
      path: "/pages/login/login",
    };
  },
  privacy_agree: function (a) {
    console.log("agree");
  },
  privacy_disagree: function (a) {
    console.log("disagree"), wx.exitMiniProgram();
  },
});
